package com.iran.state.test;

import java.time.LocalTime;
import java.time.ZoneId;

public class DiaoYeCoding extends AbstractState {
    @Override
    public void handle(DiaoYeWork work) {
        if (work.getTime().toInstant().atZone(ZoneId.systemDefault()).toLocalTime().isBefore(LocalTime.of(16,30))){
            work.setWorking("正在码代码...");
        }else {
            work.setState(new DiaoYeReading());
            work.request();
        }
    }
}
